Page({

  /**
   * 页面的初始数据
   */
  data: {
    allOrders: [],
    waitInOrders: [],
    waitPayOrders: [],
    refundingOrders: [],
    finishOrders: [],
    currentTab: 0,
    topMenu: ["全部", "待入住", "待付款", "退款中", "已完成"],
    isShow: true,
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    for (var i = 0; i <= 10; i++) {
      this.data.allOrders.push(i);
    }
    this.setData({
      allOrders: this.data.allOrders
    })
  },

  /** 
   * 点击tab切换 
   */
  swichNav: function (e) {
    var that = this;
    if (this.data.currentTab === e.target.dataset.current) {
      return false;
    } else {
      that.setData({
        currentTab: e.target.dataset.current
      })
      // wx.showToast({
      //   title: this.data.currentTab,
      // })
    }
  },

  /**
   * 订单状态按钮
   */
  btnStatus: function (e) {
    wx.showToast({
      title: 'aaaa',
    })
  }
})